package pit.com.ordermobilesystem.http;

import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.net.HttpURLConnection;
import java.net.URL;

import org.apache.http.NameValuePair;

public interface HttpApi {

  abstract public HttpModel doHttpRequest(String url, Parser<? extends HttpModel> parser, ResponseType type) throws HttpApiException,
      IOException;
  abstract public HttpModel doHttpRequest(String url, String content, Parser<? extends HttpModel> parser, ResponseType type) throws HttpApiException,
  IOException;
  
  abstract public HttpURLConnection createHttpURLConnection(URL url) throws IOException;

  abstract public String createHttpGet(String url, NameValuePair... nameValuePairs) throws UnsupportedEncodingException;

  abstract public String createHttpRest(String url, NameValuePair... nameValuePairs)
      throws UnsupportedEncodingException;
}
